@import '../../variables.scss';

.hzdz-station-equipment-summary {
  position: relative;
  width: 510px;
  height: auto;
  
  // 响应式适配
  @media screen and (max-width: 1920px) {
    transform: scale(0.8);
    transform-origin: top left;
  }
  
  @media screen and (max-width: 1080px) {
    transform: scale(0.6);
    transform-origin: top left;
  }
  
  @media screen and (min-width: 3952px) {
    transform: scale(1.2);
    transform-origin: top left;
  }

  // 顶部标题栏
  &__header {
    position: relative;
    width: 510px;
    height: 56px;
    margin-bottom: 1px;
  }

  &__header-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
  }

  &__title {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 145px;
    height: 24px;
    font-family: YouSheBiaoTiHei, sans-serif;
    font-size: 24px;
    color: #FFFFFF;
    line-height: 24px;
    letter-spacing: 2px;
    text-shadow: 0px 1px 8px rgba(0, 15, 13, 0.66);
    text-align: left;
    font-style: normal;
    background: linear-gradient(90deg, #FFFFFF 0%, #4899FF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }

  &__english-title {
    position: absolute;
    left: 185px;
    top: 50%;
    transform: translateY(-50%);
    width: 279px;
    height: 14px;
    font-family: AzonixRegular, sans-serif;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.4);
    line-height: 14px;
    text-align: left;
    font-style: normal;
  }

  // 主内容区域
  &__content {
    width: 500px;
    min-height: 457px;
    background: linear-gradient(180deg, #14191F 0%, #3C4249 100%), 
                linear-gradient(178deg, rgba(9, 11, 13, 0) 0%, #26394D 100%), 
                radial-gradient(185% 43% at 53% -3%, rgba(166, 213, 255, 0.5) 0%, rgba(166, 209, 255, 0) 24%, rgba(179, 212, 255, 0) 100%);
    border: 1px solid rgba(77, 89, 102, 0.25);
    border-radius: 4px;
    padding: 20px;
    margin-left: 0;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 20px;
  }

  // Section样式
  &__section {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  &__section-header {
    position: relative;
    display: flex;
    align-items: center;
    height: 24px;
    
    &--small {
      height: 20px;
    }
  }

  &__section-dot {
    width: 17px;
    height: 17px;
    background: #033A74;
    border: 1px solid #008BFF;
    border-radius: 50%;
    margin-right: 8px;
    flex-shrink: 0;
    
    &--small {
      width: 7px;
      height: 7px;
      background: #008BFF;
      box-shadow: 0px 1px 4px 0px #008BFF;
      border: 1px solid #CAF3F8;
    }
  }

  &__section-title {
    font-family: SourceHanSansSC, SourceHanSansSC;
    font-weight: 500;
    font-size: 16px;
    color: #6FBDFF;
    line-height: 24px;
    text-align: left;
    font-style: normal;
    letter-spacing: 0.57px;
    white-space: nowrap;
  }

  &__section-line {
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, rgba(0, 139, 255, 0) 0%, #008BFF 100%);
    margin-left: 8px;
    
    &--small {
      width: 102px;
      flex: none;
    }
  }

  &__section-arrow {
    width: 6px;
    height: 11px;
    background: #37A4FF;
    box-shadow: 0px 0px 6px 0px #7EC4FF;
    clip-path: polygon(0 0, 100% 50%, 0 100%);
    flex-shrink: 0;
    margin-left: 14px;
  }

  // 消防设备
  &__fire-equipment {
    display: flex;
    gap: 40px;
    padding: 0 56px;
  }

  &__fire-item {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  &__fire-icon {
    width: 60px;
    height: 60px;
    
    img {
      width: 100%;
      height: 100%;
      object-fit: contain;
    }
  }

  &__fire-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  &__fire-label {
    font-family: SourceHanSansSC, SourceHanSansSC;
    font-weight: 400;
    font-size: 16px;
    color: #FFFFFF;
    line-height: 22px;
    text-align: left;
    font-style: normal;
  }

  &__fire-value {
    font-family: DINAlternate, DINAlternate;
    font-weight: bold;
    font-size: 24px;
    color: #1AD7FF;
    line-height: 30px;
    text-align: center;
    font-style: normal;
    background: linear-gradient(90deg, #FFFFFF 0%, #81C6FF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.86px;
  }

  // 表格样式
  &__table {
    width: 100%;
    border-radius: 4px;
    overflow: hidden;
  }

  &__table-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    background: rgba(0, 0, 0, 0.3);
    height: 36px;
    align-items: center;
    padding: 0 16px;
  }

  &__table-body {
    background: rgba(16, 85, 163, 0.1);
  }

  &__table-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    height: 36px;
    align-items: center;
    padding: 0 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    
    &:last-child {
      border-bottom: none;
    }
  }

  &__table-cell {
    font-family: SourceHanSansSC, SourceHanSansSC;
    font-weight: 400;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 20px;
    text-align: center;
    
    &:first-child {
      text-align: left;
    }
  }

  .hzdz-station-equipment-summary__table-header .hzdz-station-equipment-summary__table-cell {
    font-weight: 500;
    font-size: 16px;
    color: #56A5FF;
  }

  // 底部sections
  &__bottom-sections {
    display: flex;
    gap: 20px;
  }

  &__weather-section,
  &__special-section {
    flex: 1;
  }

  // 气象设备
  &__weather-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  &__weather-stat {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  &__weather-label {
    font-family: SourceHanSansSC, SourceHanSansSC;
    font-weight: 400;
    font-size: 16px;
    color: #FFFFFF;
    line-height: 22px;
  }

  &__weather-value {
    font-family: DINAlternate, DINAlternate;
    font-weight: bold;
    font-size: 24px;
    color: #1AD7FF;
    line-height: 24px;
    background: linear-gradient(90deg, #FFFFFF 0%, #81C6FF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.86px;
  }

  &__weather-chart {
    display: flex;
    justify-content: center;
    align-items: center;
  }

  &__weather-legend {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 0 20px;
  }

  &__legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
  }

  &__legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    
    &--0 { background: #00D4FF; }
    &--1 { background: #58FFF6; }
    &--2 { background: #FFA726; }
    &--3 { background: #FF6B6B; }
  }

  &__legend-text {
    font-family: SourceHanSansSC, SourceHanSansSC;
    font-weight: 400;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 16px;
  }

  // 特种设备
  &__special-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-top: 12px;
  }

  &__special-item {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  &__special-icon {
    width: 48px;
    height: 48px;
    
    img {
      width: 100%;
      height: 100%;
      object-fit: contain;
    }
  }

  &__special-label {
    font-family: SourceHanSansSC, SourceHanSansSC;
    font-weight: 400;
    font-size: 16px;
    color: #FFFFFF;
    line-height: 22px;
    white-space: nowrap;
  }

  &__special-value-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
  }

  &__special-value-bg {
    position: absolute;
    width: 80px;
    height: 30px;
    background: linear-gradient(90deg, rgba(52, 165, 255, 0) 0%, rgba(52, 165, 255, 0.39) 27%, rgba(52, 165, 255, 0.45) 51%, rgba(52, 165, 255, 0.35) 79%, rgba(0, 139, 255, 0) 100%);
    opacity: 0.65;
    border-radius: 4px;
  }

  &__special-value {
    font-family: DINAlternate, DINAlternate;
    font-weight: bold;
    font-size: 24px;
    color: #1AD7FF;
    line-height: 30px;
    text-align: center;
    font-style: normal;
    background: linear-gradient(90deg, #FFFFFF 0%, #81C6FF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.86px;
    position: relative;
    z-index: 1;
  }

  // 响应式调整
  @media screen and (max-width: 1920px) {
    &__content {
      width: 400px;
      min-height: 366px;
      padding: 16px;
      gap: 16px;
    }
    
    &__header {
      width: 408px;
      height: 45px;
    }
    
    &__title {
      font-size: 19px;
      left: 16px;
      width: 116px;
    }
    
    &__english-title {
      font-size: 11px;
      left: 148px;
      width: 223px;
    }
    
    &__fire-equipment {
      gap: 32px;
      padding: 0 45px;
    }
    
    &__fire-icon {
      width: 48px;
      height: 48px;
    }
    
    &__fire-label {
      font-size: 13px;
    }
    
    &__fire-value {
      font-size: 19px;
    }
    
    &__table-header,
    &__table-row {
      height: 29px;
      padding: 0 13px;
    }
    
    &__table-cell {
      font-size: 11px;
    }
    
    .hzdz-station-equipment-summary__table-header .hzdz-station-equipment-summary__table-cell {
      font-size: 13px;
    }
    
    &__weather-label,
    &__special-label {
      font-size: 13px;
    }
    
    &__weather-value,
    &__special-value {
      font-size: 19px;
    }
    
    &__special-icon {
      width: 38px;
      height: 38px;
    }
    
    &__weather-chart {
      .echarts-for-react {
        transform: scale(0.8);
      }
    }
  }
  
  @media screen and (max-width: 1080px) {
    &__content {
      width: 300px;
      min-height: 274px;
      padding: 12px;
      gap: 12px;
    }
    
    &__header {
      width: 306px;
      height: 34px;
    }
    
    &__title {
      font-size: 14px;
      left: 12px;
      width: 87px;
    }
    
    &__english-title {
      font-size: 8px;
      left: 111px;
      width: 167px;
    }
    
    &__fire-equipment {
      gap: 24px;
      padding: 0 34px;
    }
    
    &__fire-icon {
      width: 36px;
      height: 36px;
    }
    
    &__fire-label {
      font-size: 10px;
    }
    
    &__fire-value {
      font-size: 14px;
    }
    
    &__table-header,
    &__table-row {
      height: 22px;
      padding: 0 10px;
    }
    
    &__table-cell {
      font-size: 8px;
    }
    
    .hzdz-station-equipment-summary__table-header .hzdz-station-equipment-summary__table-cell {
      font-size: 10px;
    }
    
    &__weather-label,
    &__special-label {
      font-size: 10px;
    }
    
    &__weather-value,
    &__special-value {
      font-size: 14px;
    }
    
    &__special-icon {
      width: 29px;
      height: 29px;
    }
    
    &__weather-chart {
      .echarts-for-react {
        transform: scale(0.6);
      }
    }
  }
  
  @media screen and (min-width: 3952px) {
    &__content {
      width: 600px;
      min-height: 548px;
      padding: 24px;
      gap: 24px;
    }
    
    &__header {
      width: 612px;
      height: 67px;
    }
    
    &__title {
      font-size: 29px;
      left: 24px;
      width: 174px;
    }
    
    &__english-title {
      font-size: 17px;
      left: 222px;
      width: 335px;
    }
    
    &__fire-equipment {
      gap: 48px;
      padding: 0 67px;
    }
    
    &__fire-icon {
      width: 72px;
      height: 72px;
    }
    
    &__fire-label {
      font-size: 19px;
    }
    
    &__fire-value {
      font-size: 29px;
    }
    
    &__table-header,
    &__table-row {
      height: 43px;
      padding: 0 19px;
    }
    
    &__table-cell {
      font-size: 17px;
    }
    
    .hzdz-station-equipment-summary__table-header .hzdz-station-equipment-summary__table-cell {
      font-size: 19px;
    }
    
    &__weather-label,
    &__special-label {
      font-size: 19px;
    }
    
    &__weather-value,
    &__special-value {
      font-size: 29px;
    }
    
    &__special-icon {
      width: 58px;
      height: 58px;
    }
    
    &__weather-chart {
      .echarts-for-react {
        transform: scale(1.2);
      }
    }
  }
}